//暂时没用
import { DEFAULT_TOKEN_KEY } from '../constants/index'
export default {
    state: {
        token: "",
    },

    effects: {
    },

    reducers: {
        
    },
    setToken(state, { value }) {
        console.log(1);
        if(value != undefined && value != null){
         this.state.token =  value   
        }
        localStorage.setItem(DEFAULT_TOKEN_KEY, this.state.token)
    },
    getToken(state) {
        let tokenObj = localStorage.getItem(DEFAULT_TOKEN_KEY);
        if(tokenObj === undefined || tokenObj === null){
            return "";
        }
        return tokenObj;
    },
};